{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ab391f80-7767-472b-844d-feed724b216a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40e01b98-5fba-404a-ba71-c43345f687de",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0fa85dca-eae1-4c0f-9216-d68cc4db5b76",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eb5cfce9-d347-45fe-95fc-0193a50ec5de",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f302b6a8-358f-4e39-b2d1-e3645fc8026b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "aaaaa\n"
     ]
    }
   ],
   "source": [
    "x = 5\n",
    "x = \"a\" * x\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e4afe9b3-8ace-4c10-a1a3-3dff54cc36d1",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0515bbc7-e4ca-4704-93b9-1c0e7f3c3249",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6fd2282b-425c-4f08-9680-0fc6921ba83f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "844e92da-45e5-48c3-b0b8-b7a8bb01e41e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "aaaaa\n"
     ]
    }
   ],
   "source": [
    "x = 5\n",
    "x = \"a\" * x\n",
    "print(x)\n",
    "x = 9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c2e67e66-48b6-4cd2-9d9e-fc658c100af1",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "1e13b42f-08b2-4019-aaef-8193d0cdd919",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "aaaaa\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "27"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = 5\n",
    "x = \"a\" * x\n",
    "print(x)\n",
    "x = 9\n",
    "x * 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "73c69c10-93c3-40ff-a2de-a4d8a7e1f426",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[4, 2, 9]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = [4, 2, 9]\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "c525273e-2822-4395-9f73-e8d7ebf25e39",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a.pop()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "56baeff2-420a-402d-8d16-2b69a178987c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[4, 2]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "feb59045-9ccd-4928-bab1-f84aff61f0cb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[4, 2]\n"
     ]
    }
   ],
   "source": [
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "955bba45-835a-4594-9a25-fee679a982c4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[4, 2]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "49c27ec0-a596-4746-b81d-8ef256a91450",
   "metadata": {},
   "outputs": [],
   "source": [
    "a.append(7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "b6725568-b389-40b5-baec-33f2be2e9be5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[4, 2, 7]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9c6482bd-6cc2-400a-92c6-9ac3edef1b26",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "14"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_5 + 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "102f61fd-918c-4f63-ac06-f4bf2a38c6a5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello\n",
      "hello\n",
      "hello\n",
      "hello\n",
      "hello\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[31m---------------------------------------------------------------------------\u001b[39m",
      "\u001b[31mKeyboardInterrupt\u001b[39m                         Traceback (most recent call last)",
      "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[12]\u001b[39m\u001b[32m, line 5\u001b[39m\n\u001b[32m      3\u001b[39m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[32m      4\u001b[39m     \u001b[38;5;28mprint\u001b[39m(\u001b[33m\"\u001b[39m\u001b[33mhello\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m----> \u001b[39m\u001b[32m5\u001b[39m     \u001b[43mtime\u001b[49m\u001b[43m.\u001b[49m\u001b[43msleep\u001b[49m\u001b[43m(\u001b[49m\u001b[32;43m3\u001b[39;49m\u001b[43m)\u001b[49m\n",
      "\u001b[31mKeyboardInterrupt\u001b[39m: "
     ]
    }
   ],
   "source": [
    "import time\n",
    "\n",
    "while True:\n",
    "    print(\"hello\")\n",
    "    time.sleep(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "c642ba07-caec-4c9f-95eb-6acecc69d4f1",
   "metadata": {},
   "outputs": [],
   "source": [
    "x = 20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "c103606c-9879-498b-9274-8ca1a3e628fc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "done\n"
     ]
    }
   ],
   "source": [
    "print(\"done\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "19eb4c06-d341-4300-b8cc-6cf3e008d560",
   "metadata": {},
   "source": [
    "# 数据科学之旅：从基础到应用\n",
    "\n",
    "## 一、数据科学简介\n",
    "数据科学是一门融合了统计学、数学、计算机科学和领域知识的交叉学科，旨在从数据中提取有价值的信息和知识。它在当今数字化时代扮演着至关重要的角色，广泛应用于商业、医疗、科研等众多领域。\n",
    "\n",
    "### 数据科学的重要性\n",
    "- **商业决策**：帮助企业分析市场趋势、客户行为，从而制定更明智的战略。\n",
    "- **医疗保健**：辅助疾病预测、药物研发，提高医疗效率和质量。\n",
    "- **科学研究**：加速数据驱动的发现，推动各学科的发展。\n",
    "\n",
    "## 二、数据类型与表示\n",
    "\n",
    "### 2.1 数值型数据\n",
    "数值型数据是最常见的数据类型之一，可分为整数和浮点数。\n",
    "- **整数**：如 1, 2, 3 等，用于表示离散的数量。\n",
    "- **浮点数**：如 3.14, 2.718 等，用于表示连续的数值。\n",
    "\n",
    "### 2.2 文本型数据\n",
    "文本型数据由字符组成，可用于存储信息、描述事物等。例如：\n",
    "```python\n",
    "text = \"这是一段文本数据示例。\"\n",
    "print(text)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "541f870b-3ffe-4b0d-baa0-3755fa404a83",
   "metadata": {},
   "source": [
    "1. IPython 的奠基（2001-2011）\n",
    "起源：2001 年，Fernando Pérez 为解决 Python 交互式开发的痛点，创建了 IPython 项目。最初聚焦于增强 Python 解释器的功能，例如支持命令行补全、历史记录和代码调试。\n",
    "突破：2007 年引入 \"魔术命令\"（如%timeit），大幅提升科学计算效率。2011 年推出基于 Web 的 IPython Notebook，首次实现代码、文本、可视化的整合，成为 Jupyter 的核心原型。\n",
    "2. Jupyter 的诞生（2014）\n",
    "理念升级：随着对 R、Julia 等语言的支持需求增加，IPython 项目于 2014 年正式更名为 Jupyter（取自 Julia、Python、R 的缩写）。这一转变标志着其从 Python 专属工具转向多语言交互计算平台。\n",
    "架构革新：采用语言无关的内核协议（Kernel Gateway Protocol），允许开发者为任意语言编写内核。例如，2015 年 R 内核 IRkernel 和 Julia 内核 IJulia 的推出，迅速吸引了统计学家和数值计算研究者。\n",
    "3. JupyterLab 的现代化（2018 - 至今）\n",
    "界面重构：2018 年发布的 JupyterLab 采用 Electron 框架，支持多标签页、插件系统和分屏布局，解决了传统 Notebook 扩展性不足的问题。\n",
    "功能扩展：\n",
    "调试器：集成 Python 调试器，支持断点设置和变量监控。\n",
    "版本控制：与 GitHub、GitLab 深度集成，实现代码版本管理。\n",
    "可视化工具：支持 Plotly、Bokeh 等交互式图表库，直接在单元格内渲染动态图形。\n",
    "性能优化：2023 年 JupyterLab 4.0 引入 WebAssembly（Wasm）技术，显著提升大型数据集的处理速度。\n",
    "4. 轻量化与云端化（2020 - 至今）\n",
    "JupyterLite：2020 年推出的浏览器端版本，无需服务器即可运行，支持通过 GitHub Pages 部署。例如，用户可直接在浏览器中打开 Gist 代码片段并运行。\n",
    "云服务集成：Google Colab、微软 Azure Notebooks 等平台将 Jupyter 作为核心开发环境，提供免费 GPU 资源，降低机器学习入门门槛。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dde40019-b8bb-4e79-8619-9c86a2dc787a",
   "metadata": {},
   "source": [
    "<h1>这是一个不使用 CSS 的 HTML 示例页面</h1>\n",
    "\n",
    "<!-- 段落 -->\n",
    "<p>本页面展示了各种 HTML 元素，没有添加任何 CSS 样式。</p>\n",
    "\n",
    "<!-- 无序列表 -->\n",
    "<h2>无序列表示例</h2>\n",
    "<ul>\n",
    "    <li>列表项 1</li>\n",
    "    <li>列表项 2</li>\n",
    "    <li>列表项 3</li>\n",
    "</ul>\n",
    "\n",
    "<!-- 有序列表 -->\n",
    "<h2>有序列表示例</h2>\n",
    "<ol>\n",
    "    <li>第一项</li>\n",
    "    <li>第二项</li>\n",
    "    <li>第三项</li>\n",
    "</ol>\n",
    "\n",
    "<!-- 链接 -->\n",
    "<h2>链接示例</h2>\n",
    "<p>点击下面的链接访问百度：</p>\n",
    "<a href=\"https://www.baidu.com\">百度</a>\n",
    "\n",
    "<!-- 图片 -->\n",
    "<h2>图片示例</h2>\n",
    "<p>这是一张示例图片：</p>\n",
    "<img src=\"https://picsum.photos/200/300\" alt=\"示例图片\">\n",
    "\n",
    "<!-- 表格 -->\n",
    "<h2>表格示例</h2>\n",
    "<table>\n",
    "    <tr>\n",
    "        <th>姓名</th>\n",
    "        <th>年龄</th>\n",
    "        <th>职业</th>\n",
    "    </tr>\n",
    "    <tr>\n",
    "        <td>张三</td>\n",
    "        <td>25</td>\n",
    "        <td>工程师</td>\n",
    "    </tr>\n",
    "    <tr>\n",
    "        <td>李四</td>\n",
    "        <td>30</td>\n",
    "        <td>教师</td>\n",
    "    </tr>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "36e17854-7fb4-491b-8e21-263eb23f2037",
   "metadata": {},
   "source": [
    "### 量子力学中的薛定谔方程\n",
    "\n",
    "在量子力学里，不含时的薛定谔方程能够表示为：\n",
    "$$\n",
    "-\\frac{\\hbar^{2}}{2m}\\nabla^{2}\\psi(\\mathbf{r}) + V(\\mathbf{r})\\psi(\\mathbf{r}) = E\\psi(\\mathbf{r})\n",
    "$$\n",
    "这里，$\\hbar$ 是约化普朗克常数，$m$ 是粒子质量，$\\nabla^{2}$ 是拉普拉斯算符，$\\psi(\\mathbf{r})$ 是波函数，$V(\\mathbf{r})$ 是势能函数，$E$ 是粒子的能量。\n",
    "\n",
    "### 广义相对论中的爱因斯坦场方程\n",
    "\n",
    "广义相对论里，爱因斯坦场方程为：\n",
    "$$\n",
    "G_{\\mu\\nu}=R_{\\mu\\nu}-\\frac{1}{2}g_{\\mu\\nu}R = \\frac{8\\pi G}{c^{4}}T_{\\mu\\nu}\n",
    "$$\n",
    "其中，$G_{\\mu\\nu}$ 是爱因斯坦张量，$R_{\\mu\\nu}$ 是里奇张量，$g_{\\mu\\nu}$ 是度规张量，$R$ 是标量曲率，$G$ 是万有引力常数，$c$ 是真空中的光速，$T_{\\mu\\nu}$ 是能量 - 动量张量。\n",
    "\n",
    "### 流体力学中的纳维 - 斯托克斯方程\n",
    "\n",
    "在流体力学中，不可压缩粘性流体的纳维 - 斯托克斯方程如下：\n",
    "$$\n",
    "\\rho\\left(\\frac{\\partial\\mathbf{v}}{\\partial t}+(\\mathbf{v}\\cdot\\nabla)\\mathbf{v}\\right)=-\\nabla p+\\mu\\nabla^{2}\\mathbf{v}+\\mathbf{f}\n",
    "$$\n",
    "式中，$\\rho$ 是流体密度，$\\mathbf{v}$ 是流体速度矢量，$t$ 是时间，$p$ 是流体压强，$\\mu$ 是流体的动力粘度，$\\mathbf{f}$ 是作用在流体上的外力密度。\n",
    "\n",
    "### 复变函数中的留数定理\n",
    "\n",
    "复变函数里的留数定理可写为：\n",
    "$$\n",
    "\\oint_{C}f(z)dz = 2\\pi i\\sum_{k = 1}^{n}\\text{Res}(f,z_{k})\n",
    "$$\n",
    "这里，$C$ 是复平面上的一条正向简单闭曲线，$f(z)$ 是在 $C$ 及其内部除有限个孤立奇点 $z_{k}(k = 1,2,\\cdots,n)$ 外解析的函数，$\\text{Res}(f,z_{k})$ 是 $f(z)$ 在奇点 $z_{k}$ 处的留数。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "699801cc-8e81-4ec7-b92f-eadffa04d0ce",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
